<?php

namespace Action;

class Logout extends \Library\Action {

	public function execute() {
		parent::execute();
		
		$sessionConf = \Library\Config::get( 'session' );
		
		\Library\Auth\Session::getSession()->deleteRemembranceCookie();
		session_start( $sessionConf['name'] );
		session_destroy();
		unset($_SESSION['user']);
		
		$this->redirect( './' );
	}
}
